package com.example.demo.util;

import cn.hutool.json.JSONUtil;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

public class Test {

    public static void main(String[] args) {


        List<Message> messages1 = new ArrayList<>();
        messages1.add(new Message(RoleEnum.user.name(), "你好，我叫李雷，1+1等于多少？"));
//
//
        MoonshotAiUtils.chat("moonshot-v1-8k",messages1 );

        String fileId = MoonshotAiUtils.uploadFile(new File("C:/Users/19808/Desktop/1.pptx"));
        String id = JSONUtil.parseObj(fileId).getStr("id");
        String fileContent = MoonshotAiUtils.getFileContent(id);
        System.out.println(fileContent);
        System.out.println(UUID.randomUUID().toString());


    }
}
